package edu.nf.controller.room;

import edu.nf.controller.BaseController;
import edu.nf.hotel.roomtype.RoomType;
import edu.nf.hotel.roomtypedao.RoomTypeDAO;
import edu.nf.hotel.roomtypedao.impl.RoomTypeDaoImpl;
import edu.nf.hotel.vo.ResultVO;
import org.nf.web.annotation.RequestMapping;
import org.nf.web.servlet.View;
import org.nf.web.servlet.view.JsonView;

import java.util.List;

/**
 * @Data 2023-06-20
 * @Author Lsw
 */
public class ListRoomTypeController extends BaseController {
     @RequestMapping("/roomtype/list")
    public View listRoomType() {
         RoomTypeDAO roomTypeDAO = new RoomTypeDaoImpl();
         List<RoomType> list = roomTypeDAO.selectRoomType();
         ResultVO vo = success(list);
         return new JsonView(vo);

    }
}
